package com.retail.msg.mapper;

import com.retail.core.common.CommonMapper;
import com.retail.msg.entity.request.RetailMsgRequest;
import com.retail.msg.entity.vo.RetailMsgVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
* 消息 Mapper
* @author Administrator
*/
@Mapper
public interface RetailMsgMapper extends CommonMapper<RetailMsgRequest,RetailMsgVo> {
    Integer delayMsgById(@Param("id") Long id);

    List<RetailMsgVo> findMsgLikeMsgUser(@Param("msgUser") String msgUser, @Param("msgContent") String msgContent);

    @Update("update retail_msg set watched = 1, watch_user = #{adminId} where id = #{id}")
    Integer updateStatus(@Param("id") Long id, @Param("adminId") String adminId);
    
}
